#ifndef TARGETOBJECT_H_
#define TARGETOBJECT_H_
#include<cmath>
#include "../baseclass/Elem3D.h"
#include "../spec/WorldObject.h"
#include "../spec/FotoIdObject.h"
#include "../spec/RoketObject.h"


class TargetObject : public Elem3D
{
    int target_list_name;
    bool shine;
    float ang;
    float d100;
    float d70;
    float d35;
    float size;
    float damage;
    int intensity;
    int inte;
    int type;
    static bool compiled;
    
    float r,g,b;
    
public:
	TargetObject();
	virtual ~TargetObject();
    TargetObject(GameStatus* g): Elem3D(g){}
   
    bool CheckCollision(int type,float x, float y,float z);
    void ChooseValidPos();
    void LoadLists();
    void DoIdle();
    void Init();
    void Draw();
    void Increase_Difficult(){if(size > MIN_TARG_SIZE) size = size * 0.9,CalDim(), glutPostRedisplay(); }
    void Decrease_Difficult(){if(size < MAX_TARG_SIZE) size = size * 1.1,CalDim(), glutPostRedisplay(); }
    void CalDim();
    void Eval_damage();
    void Generate_Explosion(float x,float y,float z);
    float getX(){return pos.x;}
    float getZ(){return pos.z;}
};

#endif /*TARGETOBJECT_H_*/
